package cn.ycc1.demo.consumer;

import cn.ycc1.demo.api.DemoService;
import com.alibaba.dubbo.config.ApplicationConfig;
import com.alibaba.dubbo.config.ConsumerConfig;
import com.alibaba.dubbo.config.RegistryConfig;
import com.alibaba.dubbo.config.spring.ReferenceBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author ycc
 * @date 2025/5/10
 */
@Configuration
public class ConsumerConfiguration {

//    @Bean
//    public ApplicationConfig applicationConfig() {
//        ApplicationConfig applicationConfig = new ApplicationConfig();
//        applicationConfig.setName("dubbo-consumer");
//        return applicationConfig;
//    }
//
//    @Bean
//    public RegistryConfig registryConfig() {
//        RegistryConfig registryConfig = new RegistryConfig();
//        registryConfig.setAddress("zookeeper://127.0.0.1:2181");
//        registryConfig.setClient("zkclient");
//        return registryConfig;
//    }
//
//    @Bean
//    public ConsumerConfig consumerConfig() {
//        ConsumerConfig consumerConfig = new ConsumerConfig();
//        consumerConfig.setTimeout(3000);
//        return consumerConfig;
//    }
//
//    @Bean
//    public ReferenceBean<DemoService> demoServiceReference() {
//        ReferenceBean<DemoService> referenceBean = new ReferenceBean<DemoService>();
//        referenceBean.setInterface(DemoService.class);
//        referenceBean.setVersion("1.0.0");
//        return referenceBean;
//    }
}
